Component({
    properties: {
        params: {
            type: null
        },
        data: {
            type: null
        }
    },
    data: {
        video: {},
        imgurlshow: !0,
        isVideo: !1
    },
    lifetimes: {
        attached: function() {
            this.setData({
                video: this.data.data[0]
            }), "1" === this.data.video.option ? this.setData({
                imgurl: this.data.video.imgurl
            }) : this.setData({
                imgurl: ""
            });
        },
        moved: function() {},
        detached: function() {}
    },
    attached: function() {},
    ready: function() {
        this.isMp4(this.data.video.hrefurl), this.videoContext = wx.createVideoContext("myVideo", this);
    },
    pageLifetimes: {
        show: function() {},
        hide: function() {},
        resize: function() {}
    },
    methods: {
        isMp4: function(t) {
            t.endsWith(".mp4") ? this.setData({
                isVideo: !0
            }) : this.setData({
                isVideo: !1
            });
        },
        imgurlshowbtn: function() {
            this.videoContext.play(), this.setData({
                imgurlshow: !1
            });
        },
        bindended: function() {
            this.setData({
                imgurlshow: !0
            });
        }
    }
});